using System;

namespace Hvam.SharePoint.Search.Language
{
    public sealed class KeywordQueryProperty
    {
        public string Name { get; private set; }

        public KeywordQueryProperty(string name)
        {
            Name = name;
        }

        public static bool operator ==(KeywordQueryProperty x, string y)
        {
            throw new NotImplementedException();
        }

        public static bool operator !=(KeywordQueryProperty x, string y)
        {
            throw new NotImplementedException();
        }

        public static bool operator >(KeywordQueryProperty x, string y)
        {
            throw new NotImplementedException();
        }

        public static bool operator <(KeywordQueryProperty x, string y)
        {
            throw new NotImplementedException();
        }

        public static bool operator >=(KeywordQueryProperty x, string y)
        {
            throw new NotImplementedException();
        }

        public static bool operator <=(KeywordQueryProperty x, string y)
        {
            throw new NotImplementedException();
        }

        public bool Contains(string value)
        {
            throw new NotImplementedException();
        }

        public bool Equals(KeywordQueryProperty other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return Equals(other.Name, Name);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (KeywordQueryProperty)) return false;
            return Equals((KeywordQueryProperty) obj);
        }

        public override int GetHashCode()
        {
            return (Name != null ? Name.GetHashCode() : 0);
        }

        public override string ToString()
        {
            return Name;
        }
    }
}